package com.geovis.boot.service.demo.file.controller;


import com.geovis.boot.exception.CheckException;
import com.geovis.boot.service.exception.UserException;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RestController;

@RestController
public class ExceptionController {

    /**
     * 用公共异常返回
     */
    @GetMapping("user/exception")
    public void test(){
        throw new UserException();
    }

    /**
     * 自定义异常
     */
    @GetMapping("check/exception")
    public void test1(){
        throw new CheckException("error");
    }
}
